package com.xwj.exception.common.exceptions;

import lombok.Getter;

/**
 * @Author: xiaowajiang
 * @Date: 2022-04-05 15:20
 * @Description: 自定义业务异常
 **/
@Getter
public class BusinessException extends RuntimeException {
    private static final long serialVersionUID = -1721124368489531458L;
    // 错误码
    private String code;

    /**
     * 构造函数
     * @param code 异常编码
     * @param msg 异常描述
     */
    public BusinessException(String code, String msg) {
        super(msg);
        this.code = code;
    }
}